﻿<%@ Page Language="C#" MasterPageFile="~/member/MemberMasterPage.master" AutoEventWireup="true" CodeBehind="join_02.aspx.cs" Inherits="Com.Web.coffinegurunaru.member.join_02"%>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="33">&nbsp;</td>
          </tr>
          <tr>
            <td><img src="/images/member/tit_01.gif" width="351" height="49"></td>
          </tr>
          <tr>
            <td height="30">&nbsp;</td>
          </tr>
          <tr>
            <td align="center"><table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="2" bgcolor="#7a2888"><img src="/images/common/clear.gif" width="1" height="1"></td>
              </tr>
            </table>
              <table border='1' cellpadding='0' cellspacing='0' width='98%' style='border-collapse:collapse' bordercolor='#cdcdcd' frame='void'>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_18.gif" width="101" height="15"></td>
                    <td>
                      <input type="radio" name="IsLocalUser" id="IsLocalUser1" value="Y" checked="checked">
                      <label for="IsLocalUser1">내국인</label>
                      <input type="radio" name="IsLocalUser" id="IsLocalUser2" value="N">
                      <label for="IsLocalUser2">외국인</label>
                      </td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_10.gif" width="68" height="15"></td>
                    <td>
                       <input type='text' name='strUserID' id="strUserID" maxlength='20' size='20' value=''><input type="hidden" id="strUserID2" name="strUserID2" />
                       <a href="#" id="btnUserIDSearch"><img src="/images/member/bt_idcheck.gif" width="87" height="20" align="absmiddle"> <span class="small_gray">영문 소문자, 숫자4~16자</span></a></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_11.gif" width="68" height="15"></td>
                    <td>
                      <input type='password' name='strUserPWD1' id="strUserPWD1" maxlength='20' size='10' value=''>
                    영문/숫자 조합으로 8~16자리. 첫글자는 영문자로 사용</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_12.gif" width="68" height="15"></td>
                    <td>
                      <input type="password" name="strUserPWD2" id="strUserPWD2" maxlength='20' size='10' value=''></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_21.gif" width="101" height="15"></td>
                    <td><label for="radio14"></label>
                     <select name='strBirthday1' id='strBirthday1' class="member_border">
<% for(int i = 1950; i < DateTime.Now.Year; i++) { %>
                        <option value='<%=i %>'><%=i %></option>
<% } %>
                      </select>
                      <select name='strBirthday2' id='strBirthday2' class="member_border">
                        <option value='01'>01</option>
                        <option value='02'>02</option>
                        <option value='03'>03</option>
                        <option value='04'>04</option>
                        <option value='05'>05</option>
                        <option value='06'>06</option>
                        <option value='07'>07</option>
                        <option value='08'>08</option>
                        <option value='09'>09</option>
                        <option value='10'>10</option>
                        <option value='11'>11</option>
                        <option value='12'>12</option>
                      </select>
                      <select name='strBirthday3' id='strBirthday3' class="member_border">
                        <option value='01'>01</option>
                        <option value='02'>02</option>
                        <option value='03'>03</option>
                        <option value='04'>04</option>
                        <option value='05'>05</option>
                        <option value='06'>06</option>
                        <option value='07'>07</option>
                        <option value='08'>08</option>
                        <option value='09'>09</option>
                        <option value='10'>10</option>
                        <option value='11'>11</option>
                        <option value='12'>12</option>
                        <option value='13'>13</option>
                        <option value='14'>14</option>
                        <option value='15'>15</option>
                        <option value='16'>16</option>
                        <option value='17'>17</option>
                        <option value='18'>18</option>
                        <option value='19'>19</option>
                        <option value='20'>20</option>
                        <option value='21'>21</option>
                        <option value='22'>22</option>
                        <option value='23'>23</option>
                        <option value='24'>24</option>
                        <option value='25'>25</option>
                        <option value='26'>26</option>
                        <option value='27'>27</option>
                        <option value='28'>28</option>
                        <option value='29'>29</option>
                        <option value='30'>30</option>
                        <option value='31'>31</option>
                      </select>
&nbsp;&nbsp;
<input type='checkbox' name='IsLunar' id='IsLunar' value='T' >
음력 </td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_08.gif" width="68" height="15"></td>
                    <td>
                     <input type='text' name='strUserName' id='strUserName' size='15' maxlength='15' value=''>
                     </td>
                  </tr>
                </table></td>
              </tr>
               <tr>
                <td height="32"><!--성별 적용 -->
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_29.gif" width="68" height="15"></td>
                    <td><label for="radio7"></label>
                      
                        <input type="radio" name="codeSex" id="rdoMan" value="1" checked="checked"><label for="rdoMan">남</label> 
                        <input type="radio" name="codeSex" id="rdoShe" value="2"><label for="rdoShe">여</label>
                      </td>
                  </tr>
                </table>
                  <!--성별 적용 끝 --></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150" height="32"><img src="/images/member/txt_13.gif" width="68" height="15"></td>
                    <td>
                      <input type='text' name='strEmail1' id='strEmail1' size='15' value=''> @ <input type='text' name='strEmail2' id='strEmail2' size='15' value=''> 
<select name='strEmail3' id='strEmail3' align='absmiddle'>
  <option value=''>직접입력</option>
  <option value='nate.com'>네이트</option>
  <option value='hotmail.com'>핫메일</option>
  <option value='gmail.com'>구글</option>
  <option value='intizen.com'>인티즌</option>
  <option value='msn.com'>MSN</option>
  <option value='hitel.net'>하이텔</option>
  <option value='netian.com'>네띠앙</option>
  <option value='chollian.net'>천리안</option>
  <option value='freechal.com'>프리챌</option>
  <option value='hanafos.com'>하나포스</option>
  <option value='korea.com'>코리아닷컴</option>
  <option value='lycos.co.kr'>라이코스</option>
  <option value='unitel.co.kr'>유니텔</option>
  <option value='dreamwiz.com'>드림위즈</option>
  <option value='naver.com'>네이버</option>
  <option value='paran.com'>파란</option>
  <option value='yahoo.co.kr'>야후</option>
  <option value='empal.com'>엠팔</option>
  <option value='hanmail.net'>한메일</option>
</select></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td class="small_gray1">커핀그루나루 메일 서비스를 받아보시겠습니까?  
                      <input type='radio' name='IsEmail' value='Y' id="IsEmail1">
                      <label for="IsEmail1">수신</label>
                      <input type='radio' name='IsEmail' value='N' id="IsEmail2" checked="checked">
					  <label for="IsEmail2">수신거부</label>
                     </td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td height="40" class="red">수신동의를 하시면 다양한 할인혜택과 이벤트/신상품 정보를 쉽고 빠르게 만나실 수 있습니다.<br>
                      주문 및 배송관련 메일은 수신동의와 관계없이 자동 발송됩니다.</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_19.gif" width="101" height="15"></td>
                    <td>
                      <select name='n1Question' id='n1Question'>
                        <option value=''>========선택========</option>
                        <option value='1' >기억에 남는 추억의 장소는?</option>
                        <option value='2' >자신의 인생 좌우명은?</option>
                        <option value='3' >자신의 보물 제1호는?</option>
                        <option value='4' >가장 기억에 남는	선생님 성함은?</option>
                        <option value='5' >타인이 모르는 자신만의 신체비밀이 있다면?</option>
                        <option value='6' >추억하고 싶은 날짜가 있다면?</option>
                        <option value='7' >받았던 선물 중 기억에 남는	독특한 선물은?</option>
                        <option value='8' >유년시절 가장 생각나는 친구 이름은?</option>
                        <option value='9' >인상깊게 읽은 책	이름은?</option>
                        <option value='10' >읽은	책 중에서 좋아하는 구절이 있다면?</option>
                        <option value='11' >자신이 두 번째로 존경하는 인물은?</option>
                        <option value='12' >친구들에게 공개하지 않은 어릴적 별명이 있다면?</option>
                        <option value='13' >초등학교 때 기억에 남는 짝꿍 이름은?</option>
                        <option value='14' >다시 태어나면	되고 싶은 것은?</option>
                        <option value='15' >내가 좋아하는 캐릭터는?</option>
                        <option value='16' >나의 주민등록번호	끝자리는?</option>
                      </select>
                      </td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_20.gif" width="101" height="15"></td>
                    <td>
                      <input type='text' name='strAnswer' id='strAnswer'  size='25' maxlength='25' value=''>
                     </td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150" height="32"><img src="/images/member/txt_16.gif" width="68" height="15"></td>
                    <td>
                      <input type='text' name='strPostNo1' id='strPostNo1' size='3' maxlength='3' readonly="readonly" value=''> -
                      <input type='text' name='strPostNo2' id='strPostNo2' size='3' maxlength='3' readonly="readonly" value=''>
                      <a href="#" id="btnPostSearch"><img src="/images/franchise/bt_address.gif" width="77" height="20" align="absmiddle"></a></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td><input type='text' name='strAddress1' id='strAddress1' size='75' value='' style="width:500px;"></td>
                  </tr>
                  </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_14.gif" width="68" height="15"></td>
                    <td>
                        <input type='text' id='strHomePhone1' name='strHomePhone1' size='3' maxlength='3' value=''> -
                        <input type='text' id='strHomePhone2' name='strHomePhone2' size='4' maxlength='5' value=''> -
						<input type='text' id='strHomePhone3' name='strHomePhone3' size='4' maxlength='5' value=''>
                      </td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150" height="32"><img src="/images/member/txt_15.gif" width="68" height="15"></td>
                    <td><label for="radio13"></label>
                      <select name='strMobilePhone1' id='strMobilePhone1'>
                        <option value='010' >010</option>
                        <option value='011' >011</option>
                        <option value='016' >016</option>
                        <option value='017' >017</option>
                        <option value='018' >018</option>
                        <option value='019' >019</option>
                      </select>
-
				       <input type='text' name='strMobilePhone2' id='strMobilePhone2' size='4' maxlength='5' value=''>
-
                       <input type='text' name='strMobilePhone3' id='strMobilePhone3' size='4' maxlength='5' value=''>
                     </td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td class="small_gray1">커핀그루나루 SMS 문자 서비스를 받아보시겠습니까?      
                      <input type='radio' name='IsSMS' value='Y' id="IsSMS1">
                      <label for="IsSMS1">예</label>
                      <input type='radio' name='IsSMS' value='N' id="IsSMS2" checked="checked">
                      <label for="IsSMS2">아니오</label>
                    </td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td height="40" class="red">수신동의를 하시면 다양한 할인혜택과 이벤트/신상품 정보를 쉽고 빠르게 만나실 수 있습니다.<br>
                      주문 및 배송관련 메일은 수신동의와 관계없이 자동 발송됩니다.</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_24.gif" width="101" height="15"></td>
                    <td>
                      <select name='n1JoinMotiveType' id='n1JoinMotiveType'>
                        <option value=''>========선택========</option>
                        <option value='1' >인터넷 검색</option>
                        <option value='2' >신문/잡지</option>
                        <option value='3' >인터넷 배너광고</option>
                        <option value='4' >주위권유</option>
                        <option value='5' >기타	광고</option>
                        <option value='6' >기타</option>
                        </select>
                      </td>
                    </tr>
                  </table></td>
              </tr>
              </table>
              <table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="2" bgcolor="#7a2888"><img src="/images/common/clear.gif" width="1" height="1"></td>
              </tr>
            </table>
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td height="40" align="center"><a href="#" id="btnSave"><img src="/images/member/bt_join.gif" width="69" height="26"></a> <a href="/index.aspx"><img src="/images/franchise/bt_cancle.gif" width="54" height="26"></a></td>
                </tr>
              </table>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
</table></td>
          </tr>
        </table>

<script language="javascript" type="text/javascript">
(function($) {
	$.Join = {};
	
	$.Join = {
		Init : function() {
			$("#n1GroupType3").click(function() {
				$("form:eq(0)").submit();
			});
			
			$("#btnSave").click(function() {
				$.Join.Submit();
			});
			
			$("#strEmail3").change(function() {
				$("#strEmail2").val( $(this).val() );
				if ( $(this).val() != "" )
					$("#strEmail2").attr("readonly", "readonly")
				else
					$("#strEmail2").attr("readonly", null)
			});
			
			$("#strPostNo1, #strPostNo1, #btnPostSearch").click(function() {
				$.Coffine.postopen("$.Join.Post");
				return false;
			});
			
			$("#strUserID").focus(function() {
				$("#strUserID2").val( "" );
			});
			
			$("#btnUserIDSearch").click(function() {
				$("#strUserID2").val( "" );
				
				if ( $.trim( $("#strUserID").val() ) == "" ) {
					alert( "아이디를 입력하세요");
					return false;
				}
				
				if ( $.trim( $("#strUserID").val() ).length < 4  || $.trim( $("#strUserID").val() ).length > 16 ) {
					alert( "아이디는 4 ~ 16자 사이로 입력하셔야합니다.");
					return false;
				}
				
				if ( !$.Coffine.isEngNumber( $("#strUserID").val() ) ) {
					alert("아이디는 영문과 숫자로만 사용가능합니다.");
					return false;
				}
				
				window.open( "/popup/pop_idcheck.aspx?strUserID=" + $.trim( $("#strUserID").val() ), "idcheck", "width=400, height=280,toolbar=no,menubar=no,location=no, scrollbars=no, status=no, resizable=no");
				return false;
			});
		},
		
		IDCheck : function(userid) {
			$("#strUserID, #strUserID2").val( userid );
		},
		
		Post : function(post1, post2, address) {
			$("#strPostNo1").val(post1);
			$("#strPostNo2").val(post2);
			$("#strAddress1").val(address);
			$("#strAddress2").focus();
		},
		
		Submit : function() {
			if ( $("#strUserID2").val() == "") {
				alert( "아이디 중복확인을 해주세요");
				return;
			}
			
			if ( $("#strUserPWD1").val() == "") {
				alert( "비밀번호를 입력해주세요");
				return;
			}
			
			if ( $("#strUserPWD1").val().length < 8) {
				alert( "비밀번호는 8글자 이상입니다.");
				return;
			}
			
			if (!$.Coffine.isEngNumber( $("#strUserPWD1").val() ) ) {
				alert( "비밀번호는 영문과 숫자로만 입력해주세요");
				return;
			}
			
			if ($("#strUserPWD1").val() != $("#strUserPWD2").val() ) {
				alert( "비밀번호가 틀립니다.");
				return;
			}
			
			if ($("#strUserName").val() == ""  ) {
				alert( "성명을 입력해주세요.");
				return;
			}
			
			if ($("#strEmail1").val() == "" || $("#strEmail2").val() == ""  ) {
				alert( "이메일을 입력해주세요.");
				return;
			}
			
			if ($("#strEmail1").val() == "" || $("#strEmail2").val() == ""  ) {
				alert( "이메일을 입력해주세요.");
				return;
			}
			
			if ( !$.Coffine.isEngNumber($("#strEmail1").val()) )
			{
				alert( "이메일은 영문으로만 입력이 가능합니다.");
				return;
			}
			
			if ($("#n1Question").val() == "") {
				alert( "질문을 선택해주세요.");
				return;
			}
			
			if ($("#strAnswer").val() == "") {
				alert( "답변을 입력해주세요.");
				return;
			}
			
			if ($("#strAddress1").val() == "") {
				alert( "주소를 입력해주세요.");
				return;
			}

			if ($("#n1JoinMotiveType").val() == "" ) {
				alert( "가입동기를 선택해주세요.");
				return;
			}
			
			$("form:eq(0)").submit();
			return false;
		}
	}
	
	$(function() {
		$.Join.Init();
	});
})(jQuery);
</script>


</asp:Content>
